import 'package:flutter/material.dart';
import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart';



class FirstPage extends StatelessWidget{
  List _imagesUrls = [
    'https://picx.zhimg.com/80/v2-6b65282beac97dc7c492371a160b3b82_720w.webp?source=1def8aca',
    'https://img2.baidu.com/it/u=3924547169,2320541332&fm=253&fmt=auto&app=138&f=JPEG?w=638&h=416',
    'https://picx.zhimg.com/80/v2-6b65282beac97dc7c492371a160b3b82_720w.webp?source=1def8aca',
  ];

  Widget build(BuildContext context){
    return new MaterialApp(
        title: '整体标题',
        home: Scaffold(
          body: Center(
            child: Column(
              children: [
                Container(
                  height: 160,
                  child:


                Swiper(
                itemBuilder: (BuildContext context, int index) {
          return Image.network(
          _imagesUrls[index],
          fit: BoxFit.cover,
          );
          },
            itemCount: _imagesUrls.length,
            pagination: SwiperPagination(),
            layout: SwiperLayout.CUSTOM,
            customLayoutOption: new CustomLayoutOption(
                startIndex: -1, stateCount: 3)
                .addRotate(
                [-45.0 / 180, 0.0, 45.0 / 180]).addTranslate([
              new Offset(-370.0, -40.0),
              new Offset(0.0, 0.0),
              new Offset(370.0, -40.0)
            ]),
            itemWidth: 150.0,
            itemHeight: 170.0,
            //小圆点
            autoplay: false,
            loop: false,
            onTap: (int index) {},
          )


        ),
              ],
            ),
          ),
        )
    );
  }
}


